package com.bawei.park2211a.repair

import androidx.lifecycle.MutableLiveData
import com.bawei.base.bean.AddRepairEntity
import com.bawei.base.bean.ReqairEntity
import com.bawei.base.mvvm.BaseViewModel
import com.bawei.base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class AddRepairViewModel @Inject constructor(var apiService: ApiService):BaseViewModel(){
    var addRepairSuccess=MutableLiveData<ReqairEntity>()
    fun addRepair(addRepairEntity: AddRepairEntity){
        httpRequest({apiService.addRepair(addRepairEntity)},{addRepairSuccess.postValue(it)})
    }
}